{extends file="index.tpl"} 
{block name="page-content"}

	<div class="row-fluid">
		<div class="span12">
			<div class="block">
				<div class="head">
					<h2>Update App Link</h2>
					<ul class="buttons">
						<li>
							<a href="#" onClick="source('form_validation'); return false;">
								<div class="icon"><span class="ico-info"></span></div>
							</a>
						</li>
					</ul>
				</div>
				<form id="validate" method="POST" action="{$WEB_BASE_URL}/index.php?controller=appLink&action=update&id={$appLink.id}">
					<input type="hidden" name="id"  value="{$appLink.id}" />
					<div class="data-fluid">
						<div class="row-form">
							<div class="span2">App Name</div>
							<div class="span10">
								<select name="app_id" class="select" style="width: 100%;">
								{foreach from=$appNameArr item=appName}
									<option value="{$appName.id}" {if $appLink.app_id eq $appName.id}Selected{/if}>{$appName.name}</option>
								{/foreach}
								</select>
							</div>
						</div>
						
						<div class="row-form">
							<div class="span2">Type</div>
							<div class="span10">
								<select name="type" class="select" style="width: 100%;">
									<option value="JAVA" {if $appLink.type eq 'JAVA'}Selected{/if}>JAVA</option>
									<option value="ANDROID" {if $appLink.type eq 'ANDROID'}Selected{/if}>ANDROID</option>
									<option value="IOS" {if $appLink.type eq 'IOS'}Selected{/if}>IOS</option>
									<option value="WEB_GAME" {if $appLink.type eq 'WEB_GAME'}Selected{/if}>WEB_GAME</option>
									<option value="PC Windows" {if $appLink.type eq 'PC Windows'}Selected{/if}>PC Windows</option>
									<option value="TỰ ĐỘNG NHẬN DẠNG THIẾT BỊ" {if $appLink.type eq 'TỰ ĐỘNG NHẬN DẠNG THIẾT BỊ'}Selected{/if}>TỰ ĐỘNG NHẬN DẠNG THIẾT BỊ</option>
								</select>
							</div>
						</div>
						<div class="row-form">
							<div class="span2">File Type</div>
							<div class="span10">
								<select name="file_type" class="select" style="width: 100%;">
									<option value="JAD" {if $appLink.file_type eq 'JAD'}Selected{/if}>JAD</option>
									<option value="JAR" {if $appLink.file_type eq 'JAR'}Selected{/if}>JAR</option>
									<option value="APK" {if $appLink.file_type eq 'APK'}Selected{/if}>APK</option>
									<option value="IPA" {if $appLink.file_type eq 'IPA'}Selected{/if}>IPA</option>
									<option value="WEB" {if $appLink.file_type eq 'WEB'}Selected{/if}>WEB</option>
									<option value="TỰ ĐỘNG" {if $appLink.file_type eq 'TỰ ĐỘNG'}Selected{/if}>TỰ ĐỘNG</option>
									<option value="ZIP" {if $appLink.file_type eq 'ZIP'}Selected{/if}>ZIP</option>
								</select>
							</div>
						</div>
						<div class="row-form">
							<div class="span2">Device</div>
							<div class="span10">
								<select name="device" class="select" style="width: 100%;">
									<option value="ALL" {if $appLink.device eq 'ALL'}Selected{/if}>All</option>
									<option value="ONE" {if $appLink.device eq 'ONE'}Selected{/if}>ONE</option>
								</select>
							</div>
						</div>
						<div class="row-form">
							<div class="span2">Device Name</div>
							<div class="span10">
								<select name="device_id" class="select" style="width: 100%;">
										<option value="0">-- Chọn Device Name --</option>
									{foreach from=$deviceArr item=device}
										<option value="{$device.id}" {if $device.id eq $appLink.device_id}Selected{/if}>{$device.device_name}</option>
									{/foreach}
								</select>
							</div>
						</div>
						<div class="row-form">
							<div class="span2">Link</div>
							<div class="span10">
								<input type="text" name="link" value="{$appLink.link}"/> 
							</div>
						</div>
						<div class="toolbar bottom tar">
							<div class="btn-group">
								<button class="btn btn-info" type="button" onClick="$('#validate').validationEngine('hide');">Hide prompts</button>
                                <button class="btn" type="submit">Update App Link</button>
                            </div>
                       	</div>
					</div>
					
				</form>
			</div>
		</div>
	
	</div>

{/block}

